package cn.dhnep.demo.controller;



import cn.dhnep.demo.service.TbOrderItemService;
import cn.dhnep.demo.util.dataSummary;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;


@RestController
public class FilterDataController {

    @Autowired
    TbOrderItemService tbOrderItemService;

//    查询骑手在客户手中收货的数据
//    http://localhost:8080/chaxun?InitialTime=2021-09-01 00:00:00&EndTime=2021-09-30 23:59:59
    @RequestMapping(value = "chaxunjiaohuo")
    public @ResponseBody
    dataSummary Receiving(String InitialTime , String EndTime){


        dataSummary dataSummary = tbOrderItemService.queryReceivingToTime(InitialTime,EndTime);
        return dataSummary;
    }
//    查询骑手在回收站的数据
//http://localhost:8080/chaxunhuishou?InitialTime=2021-09-01%2000:00:00&EndTime=2021-09-30%2023:59:59
@RequestMapping(value = "chaxunhuishou")
public @ResponseBody
dataSummary Recovery(String InitialTime , String EndTime) {
    dataSummary dataSummary = tbOrderItemService.queryRecoveryToTime(InitialTime,EndTime);
    return dataSummary;
}
}
